package com.jing.spring_boot_demo.provider.rest;

import com.jing.spring_boot_demo.provider.service.DemoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Api(value = "/demo", tags = "测试实例")
@RequestMapping("/demo")
public class DemoController {

    @Resource
    private DemoService demoService;

    @ApiOperation(value = "/getString", notes = "获取字符串")
    @RequestMapping(value = "/getString", method = {RequestMethod.GET})
    public String getString(){
        return demoService.getString();
    }
}
